<extend name="Index/base"/>
<block name="main">
    <section class="section main">
        <div class="clearfix con-main" id="mainContainer">
            <div class="con-left">
                <div class="panel">
                    <div class="panel-header">
                        <h3 class="panel-title bbs-title">{$user.nick}</h3>
                    </div>
                    <div class="panel-body">
                        <div class="bbs-info">
                            <a class="photo bbs-photo" href="//wooo.wang/u/{$user.id}"><img src="{$user.avatar}"></a>
                            <p><strong>{:formatCount($user['visit'])}</strong> 浏览 • <strong>{$user.gx}</strong> 贡献度</p>
                            <p>{$user.desc|default='我好像什么都没写...'}</p>
                            <p class="handle"><if condition="$auth"><a class="handle-donation" href="{:U('/setUser')}">设置</a><elseif condition="UID"/><a id="donationBtn" class="handle-donation" href="javascript:void(0)">打赏</a><else/><a class="handle-donation" href="javascript:alert('您需要先登录账号')">打赏</a></if></p>
                        </div>
                    </div>
                </div>
                <div class="panel" id="siderBox">
                    <ul class="switch-section">
                        <li><a href="{:U('/u/'.$user['id'])}"><span class="icon-a"></span> 个人信息</a></li>
                        <li><a href="{:U('/collect/'.$user['id'])}"><span class="icon-star"></span> 收藏文档<span class="count green">「{$collets|default=1}」</span></a></li>
                        <li><a href="{:U('/review/'.$user['id'])}" class="red"><span class="icon-eye"></span> 审阅记录</a></li>
                        <if condition="$auth eq 1">
                            <li><a href="{:U('/msg')}"><span class="icon-msg"></span> 通知消息<if condition="$mcount gt 0"><span class="count red">「{$mcount}」</span></if></a></li>
                            <li><a href="{:U('/log')}"><span class="icon-docu"></span> 贡献日志</a></li>
                            <li><a href="{:U('/createBbs')}"><span class="icon-add"></span> 创建社区</a></li>
                            <li><a href="{:U('/createDoc')}"><span class="icon-add"></span> 创建私有文档</a></li>
                            <li><a href="{:U('/setUser')}"><span class="icon-setting"></span> 设置账号信息</a></li>
                            <li><a href="{:U('/logout@wooo.wang')}"><span class="icon-out"></span> 退 出</a></li>
                            <elseif condition="UID"/>
                            <li><a href="{:U('/u/'.UID)}"><span class="icon-left"></span> 返回个人中心</a></li>
                        </if>
                    </ul>
                </div>
            </div>
            <div class="con-right">
                <div class="panel other">
                    <div class="panel-header">
                        <h1 class="topic-title">审阅记录<span class="icon-sum" id="toggleBtn" onclick="$('#mainContainer').toggleClass('toggle-side-mark');"></span></h1>
                        <p class="topic-info">
                            <a href="//wooo.wang/u/{$user['id']}">{$user['nick']}</a> • 用户对用户专属私有文档的审阅记录！
                        </p>
                    </div>
                    <div class="panel-body">
                        <ul class="other-links clearfix editor-ul">
                            <li><strong>选择文档：</strong></li>
                            <if condition="$docs"><volist name="docs" id="vo"><li><a href="{:U('/review/'.$user['id'].'/d/'.$vo['id'])}" <if condition="$vo['id'] eq $did"> class="cur"</if>>{$vo.name} <if condition="$vo['review']"><span>[{$vo.review}]</span></if></a></li></volist><else/><li><a href="javascript:void(0)">暂无文档</a></li></if>
                        </ul>
                        <ul class="faq-container">
                            <if condition="$list">
                                <volist name="list" id="v">
                                    <if condition="$v['status'] eq 0">
                                        <li class="faq-div">
                                            <a href="javascript:void(0);" class="faq-count" title="未处理"><span>...</span></a>
                                            <elseif condition="$v['status'] eq 1"/>
                                        <li class="faq-div old">
                                            <a href="javascript:void(0);" class="faq-count" title="已通过"><span class="icon-ok green"></span></a>
                                            <else/>
                                        <li class="faq-div old">
                                            <a href="javascript:void(0);" class="faq-count" title="已拒绝"><span class="icon-no red"></span></a>
                                    </if>
                                    <div class="faq-content">
                                        <h2 class="faq-title"><a href="{:U('/review/'.$v['id'])}">{$v.title}：{$v.desc}</a></h2>
                                        <p><a href="{:U('/u/'.$v['uid'])}">{$v.nick}</a>&nbsp;&nbsp;<span class="icon-time"></span> {$v.create|date="Y-m-d",###}&nbsp;&nbsp;<a href="{:U('/d/'.$did.'/c/'.$v['cid'])}"><span class="icon-reply"></span> 当前版本</a></p>
                                    </div>
                                    </li>
                                </volist>
                                <elseif condition="$did"/>
                                暂无审阅记录！
                            </if>
                            {$page}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <if condition="UID and !$auth">
            <div class="modal hide" id="modal">
                <div class="modal-container" style="max-width:400px;margin-top:20%;">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button class="modal-close" id="modalClose"><span>&times;</span></button>
                            <h4 class="modal-title">捐赠贡献度</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form">
                                <div class="form-item">
                                    <input type="number" name="gx" id="gxInput" data-gx="{$gx}" min="1" max="{$gx}" placeholder="请填写您捐赠的贡献度...">
                                </div>
                            </div>
                            <p class="edit-tip">您当前拥有 <strong class="red" id="userAllGx">{$gx}</strong> 点贡献度...</p>
                        </div>
                        <div class="modal-footer">
                            <button class="modal-no" id="modalNo">取消</button>
                            <button class="modal-save no-save" id="modalOk" data-url="/user/donation/uid/{$user['id']}">确认</button>
                        </div>
                    </div>
                </div>
            </div>
        </if>
    </section>
</block>
<block name="js">
    <script src="__STATIC__/doc/js/donation.js?v=__VERSION__"></script>
    <script src="__STATIC__/doc/js/userCenter.js?v=__VERSION__"></script>
</block>
